﻿package com.TCPServer
{
	import flash.events.Event;
	import flash.utils.ByteArray;
	/**
	 * ...
	 * @author Omar Contreras
	 */
	public class TCPServerEvent extends Event
	{
		public static const STRING_ARRIVED:String = "STRING_ARRIVED";
		public static const NUMBER_ARRIVED:String = "NUMBER_ARRIVED";
		public static const BUFFER_ARRIVED:String = "BUFFER_ARRIVED";
		
		public var data:*;
		
		public function TCPServerEvent(type:String, data:*) 
		{
			if (type == STRING_ARRIVED)
				this.data = String(data);
			else if (type == NUMBER_ARRIVED)
				this.data = Number(data);
			else if (type == BUFFER_ARRIVED)
				this.data = data;
				
			super(type);
		}
		
	}

}